define("router", ["routes", "nProgress"], (require, exports) => {
  const nProgress = require("nProgress"),
    routes = require("routes");
  const router = new Router().createRouter({
    mode: "hash",
    routes,
  });
  router.beforeEach((to, from, next) => {
    console.log(to, from);
    nProgress.start();
    next();
  });
  router.afterEach((to, from) => {
    console.log(to, from);
    nProgress.done();
  });

  exports.router = router;
});
